package by.pavlyukevich.paymentsystem.page;

import org.apache.wicket.model.IModel;
import org.apache.wicket.model.ResourceModel;

import by.pavlyukevich.paymentsystem.login.LoginPage;
import by.pavlyukevich.paymentsystem.webapp.BasicAuthenticationSession;

public class HomePage extends BaseLayout {

	@Override
	protected void onInitialize() {
		super.onInitialize();
		if (!BasicAuthenticationSession.get().isSignedIn()) {
			setResponsePage(LoginPage.class);
			return;
		}
	}

	@Override
	protected IModel<String> getPageTitle() {
		return new ResourceModel("p.home.title");
	}

}
